package com.shijunhao.graduation.service.system;

import com.shijunhao.graduation.domain.entity.SystemFileInfo;
import com.shijunhao.graduation.service.system.BaseService;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author shijunhao
 * @since 2022-03-07
 */
public interface ISystemFileInfoService extends BaseService<SystemFileInfo> {
    /**
     * @param file: 上传文件信息
     * @return: com.shijunhao.graduation.domain.entity.SystemFileInfo
     * @author: shijunhao
     * @date: 2022/3/31 17:12
     * @description: 普通文件哈桑穿
     */
    SystemFileInfo upload(MultipartFile file);

    /**
     * @param fileId: 文件id
     * @return: void
     * @author: shijunhao
     * @date: 2022/3/31 17:12
     * @description: 文件下载
     */
    void download(Long fileId);


    /**
     * @param content: 文本内容
     * @return: com.shijunhao.graduation.domain.entity.SystemFileInfo
     * @author: shijunhao
     * @date: 2022/3/31 17:12
     * @description: 将文本内容变为文件信息
     */
    SystemFileInfo upload(String content);

    /**
     * @param id: 对应id
     * @return: java.io.File
     * @author: shijunhao
     * @date: 2022/4/8 22:42
     * @description: 获取文件
     */
    File getFile(Long id);
}
